import request from '@/config/axios'
/**
 * 分页查询营销任务
 */
export const pageQuery = (params) => {
  return request.get({ url: '/market/market-task/page-query', params })
}

/**
 * 新增营销任务
 */
export const create = (data) => {
  return request.post({ url: '/market/market-task/create', data })
}

/**
 * 更新任务
 */
export const update = (data) => {
  return request.put({ url: '/market/market-task/update', data })
}

/**
 * 获取单个营销任务
 */
export const singleGet = (id) => {
  return request.get({ url: '/market/market-task/single-get?id=' + id })
}

/**
 * 删除
 */
export const deleted = (id) => {
  return request.delete({ url: '/market/market-task/deleted?id=' + id })
}

/**
 * 取消营销任务
 */
export const cancel = (id) => {
  return request.post({ url: '/market/market-task/cancel?id=' + id })
}
